import java.util.Scanner;

public class Day3_1字符串中找出连续最长的数字串 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String strNum = "";
        int count = 0;
        char[] arr = str.toCharArray();
        for(int i = 0; i < arr.length; i++){
            if('0' <= arr[i] && '9' >= arr[i]){
                count = 1;//初始化计算器
                int index = i;
                for(int j = i+1; j < arr.length;j++){
                    if('0' <= arr[j] && '9' >= arr[j]){
                        count ++;
                        index = j;
                    }else{
                        break;
                    }
                }if(count > strNum.length()){
                    strNum = str.substring(i, index + 1);
                }
            }else{
                continue;
            }
        }
        System.out.println(strNum);
    }
}
